Advances in technology have enabled the introduction of mobile or portable devices that feature an ever increasing set of capabilities. The ubiquity of devices such as mobile phones, digital still cameras and video cameras, handheld music and media players, portable video game devices and controllers, mobile internet devices (MIDs), personal navigation devices (PNDs), wearables and other similar devices indicates the popularity and desire for these types of devices. Increasingly, such devices are equipped with one or more sensors or other systems for determining the position or motion of the portable device or for measuring one or more aspects of the environment surrounding the portable device. In turn, the data provided by one or more of these sensors may be used in a wide variety of applications and contexts, including navigation, user interface, weather monitoring and prediction, fitness tracking, security and many others.
Although many different technologies may be used depending on the type of sensor and its particular implementation, all sensors at a fundamental level involve at least some hardware portion that is influenced by condition(s) surrounding the device. Correspondingly, by assessing the degree to which the hardware portion is influenced, the sensor may provide a measurement of the condition(s). In order to make use of the sensor measurements, an application processor must be able to communicate with the sensors of the portable device in order to send commands, such as for configuring the sensor, causing it to generate data or otherwise controlling it, as well as to receive data from the sensor in a useful format. At the sensor level, aspects of the communication are typically specific to the particular design of the sensor being used which may vary considerably from vendor to vendor, or even within different versions of sensors provided by a single vendor.
Conventionally then, the application processor must have an awareness of the design of the sensor in order to communicate with it at the hardware level. As will be appreciated, this leads to complications in order to allow the application processor to accommodate different sensor designs. For example, it may be necessary to program the application processor with information covering all the potential sensor designs that may be encountered, increasing the cost and difficulty of implementation. Further, this approach may also require reprogramming the application processor when new sensor designs become available.
In light of these difficulties, it would be desirable to provide a Hardware Abstraction Layer (HAL) in the interface between the sensor and the application processor to facilitate communication. Likewise, it would be desirable to translate functions from the sensor and the application processor between hardware-independent formats and hardware-dependent formats depending on the direction of communication. This disclosure satisfies these and other goals as described in the following materials.